package com.yanwc.main;


import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

@SpringBootApplication
public class MainApplition {
    /**
     * 主程序类
     * @SpringBootApplication：这是一个SpringBoot应用
     */

    public static void main(String[] args) {

          //返回我们ioc容器
        ConfigurableApplicationContext run = SpringApplication.run(MainApplition.class, args);

        //2.查看容器的组件
        String[] names = run.getBeanDefinitionNames();
        for (String name : names) {
            System.out.println(name);
        }

    }
}
